// 基于template/src/widgets/{{appEntities}}/{{ctrls@PANEL}}-panel/{{spinalCase ctrl.codeName}}-panel-model.ts.hbs生成
import { IPanelModel } from '@/core';
function getModel(): IPanelModel {
    return {
        cssName: "",             
        caption: '',
        controlType: 'PANEL',
        codeName: 'TestList',
        entityCodeName: 'IBIZBOOK',
        name: 'list_itempanel',
        noSort: '',
        sortDir: '',
        limit: 1000, 
        dataMode: 0,
        layoutMode: "TABLE_24COL",
        rootLayoutDetailNames: ["container1"],
        layoutItems: getLayoutItems(),   
    }
}

function getLayoutItems() {
    return {
        container1: {
            name: "container1",
            type: "ITEMLAYOUT",
            caption: "容器",
            titleBarCloseMode: 0,
            isShowCaption: false,
            sysCss: "",
            itemType: "CONTAINER",    
            codeName: "",
            itemStyle: "DEFAULT",
            dynaClass: "",
            labelDynaClass: "",
            labelCssStyle: "",
            visible: true,
            disabled: false,
            layout: "FLEX",
            layoutPos: "",
            layoutHeight: 0,
            layoutWidth: 0,
            heightMode: "",
            widthMode: "",
            spacingBottom: "",
            spacingLeft: "",
            spacingRight: "",
            spacingTop: "",
            hAlignSelf: "",
            vAlignSelf: "",
            userTag:'',
            userTag2:'',
            flexGrow: 0,
            flexParams: {
                align: "",
                dir: "",
                vAlign: "",
            },
            details: ["static_label1","container2","static_label2","field_textbox1","field_textbox2","field_textbox3"],
            dataRegionType: "INHERIT",
            dataSourceType: "",
        },
        static_label1: {
            name: "static_label1",
            type: "ITEMLAYOUT",
            caption: "标签",
            titleBarCloseMode: 0,
            isShowCaption: true,
            sysCss: "",
            itemType: "RAWITEM",    
            codeName: "",
            itemStyle: "DEFAULT",
            dynaClass: "",
            labelDynaClass: "",
            labelCssStyle: "",
            visible: true,
            disabled: false,
            layout: "",
            layoutPos: "",
            layoutHeight: 0,
            layoutWidth: 0,
            heightMode: "",
            widthMode: "",
            spacingBottom: "",
            spacingLeft: "",
            spacingRight: "",
            spacingTop: "",
            hAlignSelf: "",
            vAlignSelf: "",
            userTag:'',
            userTag2:'',
            flexGrow: -1,
            flexParams: {
                align: "",
                dir: "",
                vAlign: "",
            },
            parentName: "container1",
            predefinedType: "STATIC_LABEL",
            contentType: "RAW",
            contentStyle: ``,
            rawContent: `按钮权限测试：武侠时禁用打开文本按钮`,
            htmlContent: ``,
            renderMode: "PARAGRAPH",
            wrapMode: "NOWRAP",
            vAlign: "MIDDLE",
            hAlign: "LEFT",
        },
        
        container2: {
            name: "container2",
            type: "ITEMLAYOUT",
            caption: "容器",
            titleBarCloseMode: 0,
            isShowCaption: false,
            sysCss: "",
            itemType: "CONTAINER",    
            codeName: "",
            itemStyle: "DEFAULT",
            dynaClass: "",
            labelDynaClass: "",
            labelCssStyle: "",
            visible: true,
            disabled: false,
            layout: "FLEX",
            layoutPos: "",
            layoutHeight: 0,
            layoutWidth: 0,
            heightMode: "",
            widthMode: "",
            spacingBottom: "",
            spacingLeft: "",
            spacingRight: "",
            spacingTop: "",
            hAlignSelf: "",
            vAlignSelf: "",
            userTag:'',
            userTag2:'',
            flexGrow: -1,
            flexParams: {
                align: "",
                dir: "row",
                vAlign: "",
            },
            parentName: "container1",
            details: ["button_calluilogic1","field_textbox"],
            dataRegionType: "INHERIT",
            dataSourceType: "",
        },
        button_calluilogic1: {
            name: "button_calluilogic1",
            type: "ITEMLAYOUT",
            caption: "打开文档",
            titleBarCloseMode: 0,
            isShowCaption: true,
            sysCss: "",
            itemType: "BUTTON",    
            codeName: "",
            itemStyle: "INFO",
            dynaClass: "",
            labelDynaClass: "",
            labelCssStyle: "",
            visible: true,
            disabled: false,
            layout: "",
            layoutPos: "",
            layoutHeight: 0,
            layoutWidth: 100,
            heightMode: "",
            widthMode: "PX",
            spacingBottom: "",
            spacingLeft: "",
            spacingRight: "",
            spacingTop: "",
            hAlignSelf: "",
            vAlignSelf: "",
            userTag:'',
            userTag2:'',
            flexGrow: -1,
            flexParams: {
                align: "",
                dir: "",
                vAlign: "",
            },
            parentName: "container2",
            xDataCtrlName: "",
            buttonStyle: "INFO",
            borderStyle: "",
            contentStyle: ``,
            iconAlign: "",
            renderMode: "BUTTON",
            captionItemName:"",
            uiAction: {
                actionTag: "openDocument",
                actionTarget: "SINGLEKEY",
                dataAccessAction: "OPEN_DOCUMENT",
                noPrivDisplayMode: 1,
                visible: true, 
                disabled: false,
                predefinedType: "",
                actionDECodeName: "IBIZBOOK",
            },
        },
        
        field_textbox: {
            name: "field_textbox",
            type: "ITEMLAYOUT",
            caption: "文本框",
            titleBarCloseMode: 0,
            isShowCaption: false,
            sysCss: "",
            itemType: "FIELD",    
            codeName: "",
            itemStyle: "DEFAULT",
            dynaClass: "",
            labelDynaClass: "",
            labelCssStyle: "",
            visible: true,
            disabled: false,
            layout: "",
            layoutPos: "",
            layoutHeight: 0,
            layoutWidth: 0,
            heightMode: "",
            widthMode: "",
            spacingBottom: "",
            spacingLeft: "",
            spacingRight: "",
            spacingTop: "",
            hAlignSelf: "",
            vAlignSelf: "",
            userTag:'',
            userTag2:'',
            flexGrow: -1,
            flexParams: {
                align: "",
                dir: "",
                vAlign: "",
            },
            parentName: "container2",
            required: false,
            dataItemName: "type",
            predefinedType: "FIELD_TEXTBOX",
            editorDynaClass: "",
        },
        
        
        static_label2: {
            name: "static_label2",
            type: "ITEMLAYOUT",
            caption: "标签",
            titleBarCloseMode: 0,
            isShowCaption: true,
            sysCss: "",
            itemType: "RAWITEM",    
            codeName: "",
            itemStyle: "DEFAULT",
            dynaClass: "",
            labelDynaClass: "",
            labelCssStyle: "",
            visible: true,
            disabled: false,
            layout: "",
            layoutPos: "",
            layoutHeight: 0,
            layoutWidth: 0,
            heightMode: "",
            widthMode: "",
            spacingBottom: "",
            spacingLeft: "",
            spacingRight: "",
            spacingTop: "",
            hAlignSelf: "",
            vAlignSelf: "",
            userTag:'',
            userTag2:'',
            flexGrow: -1,
            flexParams: {
                align: "",
                dir: "",
                vAlign: "",
            },
            parentName: "container1",
            predefinedType: "STATIC_LABEL",
            contentType: "RAW",
            contentStyle: ``,
            rawContent: `动态逻辑`,
            htmlContent: ``,
            renderMode: "PARAGRAPH",
            wrapMode: "NOWRAP",
            vAlign: "MIDDLE",
            hAlign: "LEFT",
        },
        
        field_textbox1: {
            name: "field_textbox1",
            type: "ITEMLAYOUT",
            caption: "文本框",
            titleBarCloseMode: 0,
            isShowCaption: false,
            sysCss: "",
            itemType: "FIELD",    
            codeName: "",
            itemStyle: "DEFAULT",
            dynaClass: "",
            labelDynaClass: "",
            labelCssStyle: "",
            visible: true,
            disabled: false,
            layout: "",
            layoutPos: "",
            layoutHeight: 0,
            layoutWidth: 0,
            heightMode: "",
            widthMode: "",
            spacingBottom: "",
            spacingLeft: "",
            spacingRight: "",
            spacingTop: "",
            hAlignSelf: "",
            vAlignSelf: "",
            userTag:'',
            userTag2:'',
            flexGrow: -1,
            flexParams: {
                align: "",
                dir: "",
                vAlign: "",
            },
            parentName: "container1",
            required: false,
            dataItemName: "",
            predefinedType: "FIELD_TEXTBOX",
            editorDynaClass: "",
            groupLogics: [
                {
                	name: '面板成员[field_textbox1][面板显示]逻辑',
                	logicType: 'GROUP',
                	logicCat: 'PANELVISIBLE',
                	notMode: false,
                	groupOP: 'AND',
                	relatedDetailNames: ["field_textbox2"],
                	childLogics: [
                		{
                			name: '逻辑项',
                			logicType: 'SINGLE',
                			logicCat: '',
                			condOP: "EQ",
                			dEFDName: "field_textbox2",
                			value: "1"
                		},
                	],
                },
                {
                	name: '面板成员[field_textbox1][表单项空输入]逻辑',
                	logicType: 'GROUP',
                	logicCat: 'ITEMBLANK',
                	notMode: false,
                	groupOP: 'AND',
                	relatedDetailNames: ["field_textbox3"],
                	childLogics: [
                		{
                			name: '逻辑项',
                			logicType: 'SINGLE',
                			logicCat: '',
                			condOP: "EQ",
                			dEFDName: "field_textbox3",
                			value: "3"
                		},
                	],
                },
                {
                	name: '面板成员[field_textbox1][表单项启用]逻辑',
                	logicType: 'GROUP',
                	logicCat: 'ITEMENABLE',
                	notMode: false,
                	groupOP: 'AND',
                	relatedDetailNames: ["field_textbox3"],
                	childLogics: [
                		{
                			name: '逻辑项',
                			logicType: 'SINGLE',
                			logicCat: '',
                			condOP: "EQ",
                			dEFDName: "field_textbox3",
                			value: "2"
                		},
                	],
                },
            ],
        },
        
        field_textbox2: {
            name: "field_textbox2",
            type: "ITEMLAYOUT",
            caption: "文本框",
            titleBarCloseMode: 0,
            isShowCaption: false,
            sysCss: "",
            itemType: "FIELD",    
            codeName: "",
            itemStyle: "DEFAULT",
            dynaClass: "",
            labelDynaClass: "",
            labelCssStyle: "",
            visible: true,
            disabled: false,
            layout: "",
            layoutPos: "",
            layoutHeight: 0,
            layoutWidth: 0,
            heightMode: "",
            widthMode: "",
            spacingBottom: "",
            spacingLeft: "",
            spacingRight: "",
            spacingTop: "",
            hAlignSelf: "",
            vAlignSelf: "",
            userTag:'',
            userTag2:'',
            flexGrow: -1,
            flexParams: {
                align: "",
                dir: "",
                vAlign: "",
            },
            parentName: "container1",
            required: false,
            dataItemName: "",
            predefinedType: "FIELD_TEXTBOX",
            editorDynaClass: "",
        },
        
        field_textbox3: {
            name: "field_textbox3",
            type: "ITEMLAYOUT",
            caption: "文本框",
            titleBarCloseMode: 0,
            isShowCaption: false,
            sysCss: "",
            itemType: "FIELD",    
            codeName: "",
            itemStyle: "DEFAULT",
            dynaClass: "",
            labelDynaClass: "",
            labelCssStyle: "",
            visible: true,
            disabled: false,
            layout: "",
            layoutPos: "",
            layoutHeight: 0,
            layoutWidth: 0,
            heightMode: "",
            widthMode: "",
            spacingBottom: "",
            spacingLeft: "",
            spacingRight: "",
            spacingTop: "",
            hAlignSelf: "",
            vAlignSelf: "",
            userTag:'',
            userTag2:'',
            flexGrow: -1,
            flexParams: {
                align: "",
                dir: "",
                vAlign: "",
            },
            parentName: "container1",
            required: false,
            dataItemName: "",
            predefinedType: "FIELD_TEXTBOX",
            editorDynaClass: "",
        },
        
        
    }
}

export const model = getModel();